home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
ada
/
c01oop.zip
/
CPPWKBK
/
CPPV4-1.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-08-25
|
592b
|
28 lines
#define HEADER "C++ Problem 4.1 by Rick Conn using Borland C++"
#include <stdio.h>
#include "cppv4-1.h"
void main(void)
{
printf("%s\n", HEADER);
complex a("A"), b("B", 2.0, 3.0), c("C");
a = b;
printf("A = B\n");
a.print(); b.print(); c.print();
a.set(5.0, -4.0);
printf("A = 5 - 4i\n");
a.print(); b.print(); c.print();
c = a + b;
printf("C = A + B\n");
a.print(); b.print(); c.print();
c = a - b;
printf("C = A - B\n");
a.print(); b.print(); c.print();
c = a * b;
printf("C = A * B\n");
a.print(); b.print(); c.print();
}